<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title></title>
</head>
<body>
		<button type="button" onclick="save()">储存</button>
		<script type="text/javascript">
			let dataList = [
				{id:1,name:'赵四',age:11,sex:'男'},
				{id:2,name:'www',age:22,sex:'nv'},
				{id:3,name:'ss',age:33,sex:'男'},
				{id:4,name:'赵ss四',age:1441,sex:'男'}
				
			]
			function save(){ 
				window.localStorage.setItem('user',JSON.stringify(dataList))
				
				console.log('数据储存成功')
			}
		</script>
</body>
</html>